Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Displaying Raw • Download


Makefile v4.7.2-rc.1 (b777193f) Text, 2.31 KB

Td2a8ff.PHONYTff7b72: Te6edf3install Te6edf3install-Te6edf3offline Te6edf3run Te6edf3dev Te6edf3dev-Te6edf3fe Te6edf3build Te6edf3lint Te6edf3test Te6edf3test-Te6edf3be-Te6edf3perf Te6edf3clean Te6edf3help Te6edf3dist-Te6edf3linux Te6edf3dist-Te6edf3linux-Te6edf3x64

T8b949e# Auto-detect offline bundle and configure caches
Te6edf3OFFLINE_BUNDLE Tff7b72:= Tff7b72$(shell find vendor/offline -maxdepth T79c0ff1 -type d -name Ta5d6ff'meshchatx-offline-bundle-*' T79c0ff2>/dev/null Tb4b4b4| head -n T79c0ff1Tff7b72)

Tff7b72ifeq ($(MESHCHATX_OFFLINE_BUILD),1)
Tff7b72 ifneq ($(OFFLINE_BUNDLE),)
Tffa657export UV_CACHE_DIR :Tff7b72= Tff7b72$(abspath Tff7b72$(OFFLINE_BUNDLETff7b72)/uv-cacheTff7b72)
Tffa657export ELECTRON_BUILDER_CACHE :Tff7b72= Tff7b72$(abspath Tff7b72$(OFFLINE_BUNDLETff7b72)/electron-builder-cacheTff7b72)
Tff7b72 endif
Tff7b72endif

Td2a8ffinstallTff7b72:
Tff7b72ifeq ($(MESHCHATX_OFFLINE_BUILD),1)
@if Tff7b72[ ! -d Ta5d6ff"node_modules" Tff7b72]Tb4b4b4; Tff7b72then Tffea00\
Tffa657echo Ta5d6ff"Error: node_modules not found for offline build." >Tb4b4b4&T79c0ff2Tb4b4b4; Tffea00\
Tffa657echo Ta5d6ff"Run: bash scripts/install-offline.sh" >Tb4b4b4&T79c0ff2Tb4b4b4; Tffea00\
Tffa657exit T79c0ff1Tb4b4b4; Tffea00\
Tff7b72fi
@echo Ta5d6ff"Offline build: skipping pnpm install (node_modules present)"
Tff7b72else
pnpm install
Tff7b72endif
uv sync --group dev Tff7b72$(Tff7b72if Tff7b72$(filter T79c0ff1,Tff7b72$(MESHCHATX_OFFLINE_BUILDTff7b72)Tff7b72),--offlineTff7b72)
uv run python scripts/patch_lxst_pyogg_ogg_ctypes.py

Td2a8ffinstall-offlineTff7b72:
bash scripts/install-offline.sh

T8b949e# Python backend only. For HMR, use: make dev OR make run in one terminal and pnpm run dev in another.
Td2a8ffrunTff7b72:
uv run python -m meshchatx.meshchat

T8b949e# Vite dev server (live reload) + backend. Open http://localhost:5173 — proxies /api and /ws to MESHCHAT_PORT (default 8000).
Td2a8ffdevTff7b72:
bash scripts/dev-local.sh

T8b949e# Vite only; expects backend already running (e.g. make run on port 8000).
Td2a8ffdev-feTff7b72:
pnpm run dev -- --host T79c0ff127.0.0.1 --port T79c0ff5173

Td2a8ffbuildTff7b72:
pnpm run build

T8b949e# Linux AppImage + deb (see package.json dist:linux).
Td2a8ffdist-linuxTff7b72:
pnpm run dist:linux

Td2a8ffdist-linux-x64Tff7b72:
pnpm run dist:linux-x64

Td2a8ffhelpTff7b72:
@echo Ta5d6ff"make dev - Vite HMR + backend (http://localhost:5173)"
@echo Ta5d6ff"make run - backend only"
@echo Ta5d6ff"make dev-fe - Vite only (pair with make run)"
@echo Ta5d6ff"make dist-linux - AppImage + deb (electron-builder)"
@echo Ta5d6ff"Env: MESHCHAT_PORT, E2E_BACKEND_PORT (vite proxy; script sets both), VITE_DEV_HOST, VITE_DEV_PORT"

Td2a8fflintTff7b72:
pnpm run lint
uv run ruff check .
uv run ruff format --check .

Td2a8fftestTff7b72:
pnpm run Tffa657test
uv run pytest tests/backend -n auto --covTff7b72=meshchatx/src/backend

Td2a8fftest-be-perfTff7b72:
uv run pytest tests/backend/test_performance_hotpaths.py tests/backend/test_performance_bottlenecks.py

Td2a8ffcleanTff7b72:
rm -rf node_modules build dist python-dist meshchatx/public build-dir out


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────